<template>
    <div class="articleBox">
        <div class="articleTop">
          <span class="imgBox">
            <img src="./img/3@2x.png">
          </span>
          <span>
            <p>书名：{{odata.title}}</p>
            <p>作者：林碗底</p>
            <p>SBN:197512</p>
            <p>出版社：中国四川文艺出版社</p>
            <p>价格：￥75</p>
          </span>
        </div>
        <div class="content">
          <h2>内容简介：</h2>
          <p>{{odata.content}}</p>
        </div>
        <div class="articleBottom">
          <h2>其他好书:</h2>

        </div>
    </div>
</template>

<script>
import axios from 'axios'
export default{
    data(){
        return{
            odata:[]
        }
    },
    created(){
      var _this=this;
      axios.get('/api/title', {
      })
      .then(function (response) {
        var dataArr=response.data.data;
        _this.odata=response.data.data[_this.$route.params.id];
      })
      .catch(function (error) {
        console.log(error);
      });
    }
}
</script>

<style lang="Sass">
    .articleBox{width: 100%; height: 100%; margin-top:.5rem;

      .articleTop{width: 100%; background: #ccc; display: flex; padding-top: .5rem; padding-bottom: .5rem;

        .imgBox{flex:0 0 5.625rem;

          img{ width: 4.625rem; height: 6.5rem; margin-left: 1rem;}
        }
        span{ flex:1;  font-size: .325rem;

          p{margin-top: .5rem; margin-left: 1rem;}
          p:first-child{margin-top: 0;}
        }
      }
      .content{ width: 100%; height: 11rem; background: #fff; padding: 0 .5rem; box-sizing:border-box;

        h2{ font-size: .7rem; line-height: 1.4rem;}
        p{font-size: .65rem;}
      }
    }

</style>